package com.kotlin.use.repository

import com.kotlin.use.api.APIDatabase
import com.kotlin.use.bean.User

class RoomRepository {
    suspend fun query(): List<User> {
        return APIDatabase().query()

    }

    suspend fun insertUser(user: User) {
        APIDatabase().insert(user)

    }

    suspend fun deleteUser(name :String) {
        APIDatabase().delete(name)
    }

    suspend fun updateUser(name: String, age: Int) {
        APIDatabase().update(name, age)
    }
}